setPlaybackSpeed

abstract fun setPlaybackSpeed(block: DesignBlock, speed: Float)

Sets the playback speed multiplier of a block that supports playback control. Note: This also adjusts the trim and duration of the block. Video fills running faster than 3.0x are force muted until reduced to 3.0x or below. An audio block that createAudioFromVideo extracts from a video faster than 3.0x keeps that speed and is force muted too. This function still rejects a speed above 3.0x for it. On a group, the speed changes no duration and acts only when group/composition is true: the children then run that many times faster.

Parameters

block

the block, video fill or group to update.

speed

The desired playback speed multiplier. Valid range is 0.25, 3.0 for audio blocks and [0.25, infinity) for video fills and groups.